﻿using System;
using System.Windows.Forms;

namespace mLabControls
{
    public class mLabTextBox : System.Windows.Forms.TextBox
    {
        public mLabTextBox() : base()
        {
            this.KeyUp += new KeyEventHandler(mLabTextBoxKeyUp);
            this.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        }

        public void mLabTextBoxKeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == System.Windows.Forms.Keys.Down) SendKeys.Send("{Tab}");
            if (e.KeyCode == System.Windows.Forms.Keys.Up) SendKeys.Send("+{Tab}");
        }
    }
}
